<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="indexDB.js"></script>
    <script>
        var mdb;
        async function run() {
            try {
                mdb = await openDb();
                console.log('db=', mdb);
            } catch (e) {
                console.log('error=', e);
            }
        }
   run();
      function _deleteDatabase(){
          deleteDatabase();
      }
        function _deletetable(){
          console.log('mdb=',mdb)
            deletetable(mdb,'users')
        }
        function _insert(){
            add(mdb,tableUser,{name:'张三',age:18,banji:'1班'})
        }
        function _deleteData(){
            deleteUser(mdb,tableUser,2)
        }
    </script>
</head>
<body>
<button onclick="_insert()">添加数据</button>
<button onclick="_deleteData()">删除数据根据id</button>
<button onclick="_deleteDatabase()">删除库</button>
<button onclick="_deletetable()">删除表</button>
</body>
</html>